<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>路由页面</title>
		<link rel="stylesheet" href="../bootstrap-3.3.7-dist/bootstrap-3.3.7-dist/css/bootstrap.css" />
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			a a:hover,a:active,a:visited,a:link{
				color:white;
				text-decoration:none;
			}
			.div_router_box{
				height: 100vh;
			}
			.class_div_header {
				height: 15vh;
				background-image: url(../img/header.png);
				background-repeat: no-repeat;
				background-size: 100%;
			}
			.class_div_list{
				text-align: center;
				padding-top:10%;
			}
			.class_div_list button{
				width:150px;
				height:80px;
				margin:20px;
				font-size:1.5em;
			}

		</style>
	</head>
	<body>
		<div class="div_router_box">
			<div class="class_div_header">
			</div>
			<div class="class_div_list">
				<a href="CompetitorList.html"><button type="button" class="btn btn-danger">候选人信息</button></a>
				<a href="ScorerInfoList.html"><button type="button" class="btn btn-danger">评分人信息</button></a>
				<a href="LiLun.html"><button type="button" class="btn btn-danger">理论宣讲</button></a>
				<a href="TanXing.html"><button type="button" class="btn btn-danger">谈心谈话</button></a>
				<a href="TotalScore.html"><button type="button" class="btn btn-danger">总分排名</button></a>
				<p></p>
				<a href="#"><button type="button" class="btn btn-danger" onclick="mydelete()">清除分数</button></a>
				<a href="#"><button type="button" class="btn btn-danger"  onclick="deleteAll()">清除所有</button></a>
				<button type="button" class="btn btn-info"  onclick="logout()">退出登陆</button
			</div>
		</div>
		    <script src="../js/jquery-1.12.4/jquery.min.js"></script>
			<script src="../bootstrap-3.3.7-dist/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
			<script src="../js/jquery-2.1.4/jquery.min.js"></script>
			<script type="text/javascript" src="../layui/layui.js"></script>
			<script type="text/javascript" src="../js/ip.js"></script>
			<script type="text/javascript" src="../js/common.js" ></script>
			<script type="text/javascript">
			function mydelete(){ 
				
					let postaddress =  '/admin/del';
			 
				$.ajax({
					//几个参数需要注意一下
					type: "GET", //方法类型
					dataType: "json", //预期服务器返回的数据类型
					contentType: "application/json;charset=utf-8",
					url: postaddress, //url 
					success: function(result) { 
						if(result.code == 0){
							alert("删除成功");
						}
					},
					error: function() {
						alert("错误");
					}
				});
			}
			
			function deleteAll(){
				let postaddress =  '/admin/delAll';
				$.ajax({
					//几个参数需要注意一下
					type: "GET", //方法类型
					dataType: "json", //预期服务器返回的数据类型
					contentType: "application/json;charset=utf-8",
					url: postaddress, //url 
					success: function(result) { 
						if(result.code == 0){
							alert("删除成功");
						}
					},
					error: function() {
						alert("错误");
					}
				});
			}
		</script>
	</body>
</html>
